﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Clientes
{
    public partial class ListaClientes : Form
    {
        public ListaClientes()
        {
            InitializeComponent();
        }

        private void ListaClientes_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'clientesDataSet.clientes' table. You can move, or remove it, as needed.
            //dataGridView1.Refresh();
            //dataGridView1.Update();
            //dataGridView1.DataSource = null;
            //dataGridView1.DataSource =  this.clientesTableAdapter.Fill(this.clientesDataSet.clientes);

            Dados dados = new Dados();
            DataTable fillDados;
            fillDados = dados.selecionaDados();
            dataGridView1.DataSource = fillDados;
            dataGridView1.Refresh();

            Form1 form1 = new Form1();
            form1.Visible = false;


        }

        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }

        //private void fillByToolStripButton_Click(object sender, EventArgs e)
        //{

        //    try
        //    {
        //        this.clientesTableAdapter.FillBy(this.clientesDataSet.clientes);
        //    }
        //    catch (System.Exception ex)
        //    {
        //        System.Windows.Forms.MessageBox.Show(ex.Message);
        //    }

        //}
    }
}
